#include "equipment.h"

int getEquipmentInitAmmo(Object * equip) {
    switch(equip->type) {
        case EQUIPMENT_TEA_SPOON:
        return -1;
        case EQUIPMENT_TOOTHPICK:
        return -1;
        case EQUIPMENT_CUTTER:
        return -1;
        case EQUIPMENT_LIGHTER:
        return 100;
        case EQUIPMENT_LEMONER:
        return 25;
        case EQUIPMENT_SALT_SNIPER:
        return 10;
        case EQUIPMENT_PEELER:
        return -1;
        case EQUIPMENT_JUICE_NEEDLE:
        return 10;
        case EQUIPMENT_RELOADER:
        return 1;
    }
}

int getEquipmentBuyCost(Object * equip) {
    switch(equip->type) {
        case EQUIPMENT_TEA_SPOON:
        return 10;
        case EQUIPMENT_TOOTHPICK:
        return 20;
        case EQUIPMENT_CUTTER:
        return 50;
        case EQUIPMENT_LIGHTER:
        return 15;
        case EQUIPMENT_LEMONER:
        return 35;
        case EQUIPMENT_SALT_SNIPER:
        return 60;
        case EQUIPMENT_PEELER:
        return 15;
        case EQUIPMENT_JUICE_NEEDLE:
        return 30;
        case EQUIPMENT_RELOADER:
        return 20;
    }
}

float getEquipmentSellValue(Object * equip) {
    switch(equip->type) {
        case EQUIPMENT_TEA_SPOON:
        return 6;
        case EQUIPMENT_TOOTHPICK:
        return 12;
        case EQUIPMENT_CUTTER:
        return 30;
        case EQUIPMENT_LIGHTER:
        return 10 - (100 - equip->info) * 0.02;
        case EQUIPMENT_LEMONER:
        return 20 - (25 - equip->info) * 0.2;
        case EQUIPMENT_SALT_SNIPER:
        return 40 - (10 - equip->info) * 0.5;
        case EQUIPMENT_PEELER:
        return 10;
        case EQUIPMENT_JUICE_NEEDLE:
        return 25 - (10 - equip->info) * 2;
        case EQUIPMENT_RELOADER:
        return 15 - (1 - equip->info) * 10;
    }
}

float getEquipmentTotalMass(Object * equip) {
    switch(equip->type) {
        case EQUIPMENT_TEA_SPOON:
        return 5;
        case EQUIPMENT_TOOTHPICK:
        return 10;
        case EQUIPMENT_CUTTER:
        return 15;
        case EQUIPMENT_LIGHTER:
        return 12 + equip->info * 0.01;
        case EQUIPMENT_LEMONER:
        return 20 + equip->info * 0.4;
        case EQUIPMENT_SALT_SNIPER:
        return 30 + equip->info * 1;
        case EQUIPMENT_PEELER:
        return 5;
        case EQUIPMENT_JUICE_NEEDLE:
        return 12 + equip->info * 1;
        case EQUIPMENT_RELOADER:
        return 12 + equip->info * 10;
    }
}

int getEquipmentAttack(Object * equip) {
    switch(equip->type) {
        case EQUIPMENT_TEA_SPOON:
        return 4;
        case EQUIPMENT_TOOTHPICK:
        return 6;
        case EQUIPMENT_CUTTER:
        return 8;
        case EQUIPMENT_LIGHTER:
        return 2;
        case EQUIPMENT_LEMONER:
        return 4;
        case EQUIPMENT_SALT_SNIPER:
        return 6;
        case EQUIPMENT_PEELER:
        return 1;   //Défense
        case EQUIPMENT_JUICE_NEEDLE:
        return 4;   //+4 vie
        case EQUIPMENT_RELOADER:
        return 100; //+100 munition
    }
}
